#include "Objects.h"


BaseObject::BaseObject()
{
	m_pTexture = NULL;
	m_vPosition			= D3DXVECTOR3(0,0,0);
	m_stRotation.pitch	= 0;
	m_stRotation.yaw	= 0;
	m_stRotation.roll	= 0;
	m_stRotation.pitch  = 0;
	m_bActive			= true;
	m_dwSubset			= 0;
	m_fScale			= 1;
	m_iMyType			= NO_TYPE;
	BoundingRect		= sBOX(m_vPosition,m_stRotation,m_iMyType);
}
BaseObject::BaseObject(float x, float y,float roll, float yaw, bool isActive,int Type)
{
	m_vPosition			= D3DXVECTOR3(x,y,0);
	m_stRotation.roll	= roll;
	m_stRotation.yaw	= yaw;
	m_stRotation.pitch  = 0;
	m_bActive			= isActive;
	m_dwSubset			= 0;
	m_fScale			= 1;
	m_iMyType			= Type;
	BoundingRect		= sBOX(m_vPosition,m_stRotation,m_iMyType);
}

void BaseObject::RotateByDegree(float Roll, float Pitch, float Yaw)
{
	m_stRotation.roll  = DEGTORAD(Roll);
	m_stRotation.yaw   = DEGTORAD(Yaw);
	m_stRotation.pitch = DEGTORAD(Pitch);
}
void BaseObject::RefreshBoundingBox()
{
	BoundingRect	=	sBOX(m_vPosition,m_stRotation,m_iMyType);
}
BaseObject::~BaseObject()
{
		delete m_pMesh;
}
